/***********************************************************
 * Product Name: ExcelQuicker
 * Copyright (c)2005, Eunge
 * Author: Eunge
 * Web Site: www.eudev.net
 * Mail/MSN: eudev.net@yeah.net
 * ********************************************************/
using System;
using System.Collections;

namespace ExcelQuicker.Framework
{
	/// <summary>
	/// Dual-EQObject collection class. It can store two relative EQObject into this collection. There is no unique key value.
	/// </summary>
	[Serializable]
	internal class EQDualCollection
	{
		private ArrayList mArrayValue = new ArrayList();

		/// <summary>
		/// Get count of current collection
		/// </summary>
		public int Count
		{
			get
			{
				return this.mArrayValue.Count;
			}
		}

		/// <summary>
		/// Add a dual-object. There can be duplicate key value in this collection
		/// </summary>
		/// <param name="key"></param>
		/// <param name="objEQStyleBase"></param>
		public void Add(int key, EQStyleBase objEQStyleBase)
		{
			EQDualValue objEQDualValue = new EQDualValue(key, objEQStyleBase);
			this.mArrayValue.Add(objEQDualValue);
		}

		/// <summary>
		/// Get IEnumerator interface implementation
		/// </summary>
		/// <returns></returns>
		public IEnumerator GetEnumerator()
		{
			return this.mArrayValue.GetEnumerator();
		}

		/// <summary>
		/// Clear current collection
		/// </summary>
		public void RemoveAll()
		{
			this.mArrayValue.Clear();
		}
	}
}
